/******************************************************************
** File Name:common.c

** Copyright(c)2005-2011        YLMF. Inc

** Created: ChenYu Xiao  <yunsn0303@gmail.com>

** Modified by:

** Date:2011-10-10

** Description: define ylmf gdm setup common struct

** Version:0.0.1

******************************************************************/


#include "common.h"

ShowLogin *
create_show_login();

void
set_show_login_displayeruserlistcb(ShowLogin *, GtkWidget *);

void
set_show_login_loginwaittimecb(ShowLogin *, GtkWidget *);

void
set_show_login_usercombobox(ShowLogin *, GtkWidget *);

void
set_show_login_timespinbutton(ShowLogin *, GtkWidget *);

ShowAutoLogin *
create_show_auto_login();

void
set_show_auto_login_displayeruserlistcb(ShowAutoLogin *, GtkWidget *);

void
set_show_auto_login_loginwaittimecb(ShowAutoLogin *, GtkWidget *);

void
set_show_auto_login_usercombobox(ShowAutoLogin *, GtkWidget *);

void
set_show_auto_login_timespinbutton(ShowAutoLogin *, GtkWidget *);

void
set_show_auto_login_username(ShowAutoLogin *, gchar *);

void
set_show_auto_login_times(ShowAutoLogin *, gint);

ShowLogin *
create_show_login()        
{
        ShowLogin *self = NULL;
        self = (ShowLogin *)malloc(sizeof(ShowLogin));
        self->displayeruserlistcb = NULL;
        self->loginwaittimecb = NULL;
        self->usercombobox = NULL;
        self->timespinbutton = NULL;

        return self;
}

void
set_show_login_displayeruserlistcb(ShowLogin *sl, GtkWidget *dulcb)
{
        sl->displayeruserlistcb = dulcb;
}

        

void
set_show_login_loginwaittimecb(ShowLogin *sl, GtkWidget *lwtcb)
{
        sl->loginwaittimecb = lwtcb;
}


void
set_show_login_usercombobox(ShowLogin *sl, GtkWidget *ucx)
{
        sl->usercombobox = ucx;
}


void
set_show_login_timespinbutton(ShowLogin *sl, GtkWidget *tsb)
{
        sl->timespinbutton = tsb;
}


ShowAutoLogin *
create_show_auto_login()
{
        ShowAutoLogin *self = NULL;
        self = (ShowAutoLogin *)malloc(sizeof(ShowAutoLogin));
        self->displayeruserlistcb = NULL;
        self->loginwaittimecb = NULL;
        self->usercombobox = NULL;
        self->timespinbutton = NULL;
        self->username = NULL;
        self->times = 0;
        return self;
}


void
set_show_auto_login_displayeruserlistcb(ShowAutoLogin *sal, GtkWidget *dulcb)
{
        sal->displayeruserlistcb = dulcb;
}


void
set_show_auto_login_loginwaittimecb(ShowAutoLogin *sal, GtkWidget *lwtcb)
{
        sal->loginwaittimecb = lwtcb;
}


void
set_show_auto_login_usercombobox(ShowAutoLogin *sal, GtkWidget *ucx)
{
        sal->usercombobox = ucx;
}


void
set_show_auto_login_timespinbutton(ShowAutoLogin *sal, GtkWidget *tsb)
{
        sal->timespinbutton = tsb;
}


void
set_show_auto_login_username(ShowAutoLogin *sal, gchar *username)
{
        sal->username = username;
}


void
set_show_auto_login_times(ShowAutoLogin *sal, gint times)
{
        sal->times = times;
}





